package com.example.content;

import java.io.File;

public class Main7 {
    public static void main(String[] args) {
        File file = new File("C:/File/demo.tex");
        String strParentDirectory=file.getParent();
        System.out.println("文件的上级目录为："+strParentDirectory);
    }
}
